home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Suzy B Software 2
/
Suzy B Software CD-ROM 2 (1994).iso
/
mintprgs
/
mintupgr
/
disk7.zoo
/
elvis.zoo
/
usr
/
doc
/
elvis
/
cflags.doc
< prev
next >
Wrap
Text File
|
1992-08-12
|
16KB
|
463 lines
_9. _C_F_L_A_G_S
Elvis uses many preprocessor symbols to control compi-
lation. Some of these control the sizes of buffers and
such. The "-DNO_XXXX" options remove small sets of related
features.
Most Elvis users will probably want to keep all
features available. Minix-PC users, though, will have to
sacrifice some sets because otherwise Elvis would be too
bulky to compile. The "asld" phase of the compiler craps
out.
-DM_SYSV, -Dbsd, -DTOS, -DCOHERENT, -Damiga
These flags tell the compiler that Elvis is being com-
piled for System-V UNIX, BSD UNIX, Atari TOS, Coherent,
or AmigaDos, respectively. For other systems, the
config.h file can generally figure it out automati-
cally.
-DRAINBOW
For MS-DOS systems, this causes support for the DEC
Rainbow to be compiled into Elvis.
-DS5WINSIZE
Some versions of SysV UNIX don't support support the
"winsize" style of screen-size testing, so elvis
ignores window size changes by default.
However, many of the newer SysV systems defines "win-
size" in the file "/usr/include/sys/ptem.h". If your
SysV system has "winsize" then you should add
-DS5SWINSIZE to the CFLAGS setting.
-DTERMIOS
POSIX is a SysV-derived specification which uses a ter-
minal control package called "termios", instead of
"termio". Some other SysV systems may also use ter-
mios. You can make elvis uses termios instead of the
more common termio by adding -DTERMIOS to CFLAGS.
(Note: This hasn't been tested very well.)
-DNBUFS=_n_u_m_b_e_r
Elvis keeps most of your text in a temporary file; only
a small amount is actually stored in RAM. This flag
allows you to control how much of the file can be in
RAM at any time. The default is 5 blocks, and the
minimum is 3 blocks. (See the -DBLKSIZE flag, below.)
More RAM allows global changes to happen a little fas-
ter.
f you're just making many small changes in one section
of a file, though, extra RAM won't help much.
August 10, 1992
9-2 CFLAGS 9-2
-DBLKSIZE=_n_u_m_b_e_r
This controls the size of blocks that Elvis uses inter-
nally. The value of BLKSIZE must be a power of two.
Every time you double BLKSIZE, you quadruple the size
of a text file that Elvis can handle, but you also
cause the temporary file to grow faster. For MS-DOS,
Coherent, and Minix-PC, the default value is 1024,
which allows you to edit files up to almost 512K bytes
long. For all other systems, the default value is
2048, which allows you to edit files that are nearly 2
megabytes long.
The BLKSIZE also determines the maximum line length,
and a few other limits. BLKSIZE should be either 256,
512, 1024, or 2048. Values other than these can lead
to strange behaviour.
-DTMPDIR=_s_t_r_i_n_g
This sets the default value of the "directory" option,
which specifies where the temporary files should
reside. The value of TMPDIR must be a string, so be
sure your value includes the quote characters on each
end.
-DEXRC=_s_t_r, -DHMEXRC=_s_t_r, -DSYSEXRC=_s_t_r, -DEXINIT=_s_t_r
This lets you control the names of the initialization
files. Their values must be strings, so be careful
about quoting.
EXRC is the name of the initialization file in the
current directory. Its default value is ".exrc" on
UNIX systems -- the same as the real vi. Since that
isn't a legal DOS filename, under DOS the default is
"elvis.rc". For other systems, check the config.h
file.
HMEXRC is the name of the initialization file in your
home directory. By default, it is the same as EXRC.
Elvis will automatically prepend the name of your home
directory to HMEXRC at run time, so don't give a full
path name.
SYSEXRC is the name of a system-wide initialization
file. It has no default value; if you don't define a
value for it, then the code that supports SYSEXRC just
isn't compiled. The value of SYSEXRC should be a full
pathname, in quotes.
EXINIT is the name of an environment variable that can
contain initialization commands. Normally, its value
is "EXINIT".
-DKEYWORDPRG=_s_t_r_i_n_g
This flag determines the default value of the
August 10, 1992
9-3 CFLAGS 9-3
"keywordprg" option. Its value must be a string, so be
careful about quoting. The default value of this flag
is "ref", which is a C reference program.
-DCC_COMMAND=_s_t_r_i_n_g -DMAKE_COMMAND=_s_t_r_i_n_g -DERRLIST=_s_t_r_i_n_g
These control the names of the C compiler, the "make"
utility, and the error output file, respectively. They
are only used if -DNO_ERRLIST is not given.
The default value of CC_COMMAND depends on the Operat-
ing System and compiler that you use to compile elvis;
for UNIX, the default is "cc". The default values of
MAKE_COMMAND and ERRLIST are "make" and "errlist",
respectively.
-DMAXRCLEN=_n_u_m_b_e_r
This determines how large a :@ macro command can be
(measured in bytes). The default is 1000 bytes. If
you increase this value significantly, then you may
need to allocate extra memory for the stack. See the
"CHMEM" setting in the Makefile.
-DSHELL=_s_t_r_i_n_g
This is the default value of the "shell" option, and
hence the default shell used from within Elvis. This
only controls the default; the value you give here may
be overridden at run-time by setting an environment
variable named SHELL (or COMSPEC for MS-DOS). Its
value must be a string constant, so be careful about
quoting.
-DTAGS=_s_t_r_i_n_g
This sets the name of the "tags" file, which is used by
the :tag command. Its value must be a string constant,
so be careful about quoting.
-DCS_IBMPC -DCS_LATIN1 -DCS_SPECIAL
The digraph table and flipcase option will normally
start out empty. However, if you add -DCS_IBMPC or
-DCS_LATIN1 to your CFLAGS, then they will start out
filled with values that are appropriate for the IBM PC
character set or the ISO Latin-1 character set, respec-
tively.
You can also use -DCS_IBMPC and -DCS_SPECIAL together
to get digraphs that produce the PC's graphic charac-
ters.
-DDEBUG -DEBUG2
-DDEBUG adds the ":debug" and ":validate" commands, and
also adds many internal consistency checks. It
increases the size of the ".text" segment by about 6K.
-DDEBUG2 causes a line to be appended to a file called
August 10, 1992
9-4 CFLAGS 9-4
"debug.out" everytime any change is made to the edit
buffer.
-DCRUNCH
This flag removes some non-critical code, so that Elvis
is smaller. For example, it removes a short-cut from
the regexp package, so that text searches are slower.
Also, screen updates are not as efficient. A couple of
obscure features are disabled by this, too.
-DNO_MKEXRC
This removes the ":mkexrc" command, so you have to
create any .exrc files manually. The size of the .text
segment will be reduced by about 600 bytes.
-DNO_CHARATTR
Permanently disables the charattr option. This reduces
the size of your ".text" segment by about 850 bytes.
-DNO_RECYCLE
Normally, Elvis will recycle space (from the temporary
file) which contains totally obsolete text. This flag
disables this recycling. Without recycling, the
".text" segment is about 1K smaller than it would oth-
erwise be, but the tmp file grows much faster. If you
have a lot of free space on your hard disk, but Elvis
is too bulky to run with recycling, then try it without
recycling.
When using a version of Elvis that has been compiled
with -DNO_RECYCLE, you should be careful to avoid mak-
ing many small changes to a file because each indivi-
dual change will cause the tmp file to grow by at least
1k. Hitting "x" thirty times counts as thirty changes,
but typing "30x" counts as one change. Also, you
should occasionally do a ":w" followed by a ":e" to
start with a fresh tmp file.
Interestingly, the real vi never recycles space from
its temporary file.
-DNO_SENTENCE
Leaves out the "(" and ")" visual mode commands. Also,
the "[[", "]]", "{", and "}" commands will not recog-
nize *roff macros. The sections and paragraphs options
go away. This saves about 650 bytes in the ".text"
segment.
-DNO_CHARSEARCH
Leaves out the visual commands which locate a given
character in the current line: "f", "t", "F", "T", ","
and ";". This saves about 900 bytes.
-DNO_EXTENSIONS
August 10, 1992
9-5 CFLAGS 9-5
Leaves out the "K" and "#" visual commands. Also, the
arrow keys will no longer work in input mode. Regular
expressions will no longer recognize the \{\} operator.
(Other extensions are either inherent in the design of
Elvis, or are controlled by more specific flags, or are
too tiny to be worth removing.) This saves about 250
bytes.
-DNO_MAGIC
Permanently disables the "magic" option, so that most
meta-characters in a regular expression are *NOT*
recognized. This saves about 3k of space in the
".text" segment, because the complex regular expression
code can be replaced by much simpler code.
-DNO_SHOWMODE
Permanently disables the "showmode" option, saving
about 250 bytes.
-DNO_CURSORSHAPE
Normally, Elvis tries to adjust the shape of the cursor
as a reminder of which mode you're in. The
-DNO_CURSORSHAPE flag disables this, saving about 150
bytes.
-DNO_DIGRAPH
To allow entry of non-ASCII characters, Elvis supports
digraphs. A digraph is a single (non-ASCII) character
which is entered as a combination of two other (ASCII)
characters. If you don't need to input non-ASCII char-
acters, or if your keyboard supports a better way of
entering non-ASCII characters, then you can disable the
digraph code and save about 450 bytes.
-DNO_ERRLIST
Elvis adds a ":errlist" command, which is useful to
programmers. If you don't need this feature, you can
disable it via the -DNO_ERRLIST flag. This will reduce
the .text segment by about 900 bytes, and the .bss seg-
ment by about 300 bytes.
-DNO_ABBR
The -DNO_ABBR flag disables the ":abbr" command, and
reduces the size of Elvis by about 250 bytes.
-DNO_OPTCOLS
When Elvis displays the current options settings via
the ":set" command, the options are normally sorted
into columns. The -DNO_OPTCOLS flag causes the options
to be sorted across the rows, which is much simpler for
the computer. The -DNO_OPTCOLS flag will reduce the
size of your .text segment by about 500 bytes.
-DNO_MODELINES
August 10, 1992
9-6 CFLAGS 9-6
This removes all support for modelines.
-DNO_TAG
This disables tag lookup. It reduces the size of the
.text segment by about 750 bytes.
-DNO_ALT_FKEY -DNO_CTRL_FKEY -DNO_SHIFT_FKEY -DNO_FKEY
These remove explicit support of function keys. -
DNO_ALT_FKEY removes support for the <alternate> ver-
sions function keys. -DNO_CTRL_FKEY removes support
for the <control> and <alternate> versions function
keys. -DNO_SHIFT_FKEY removes support for the <shift>,
<control>, and <alternate> versions function keys. -
DNO_FKEY removes all support of function keys.
Elvis's ":map" command normally allows you to use the
special sequence "#<n>" to map function key <n>. For
example, ":map #1 {!}fmt^M" will cause the <F1> key to
reformat a paragraph. Elvis checks the :k1=: field in
the termcap description of your terminal to figure out
what code is sent by the <F1> key. This is handy
because it allows you to create a .exrc file which maps
function keys the same way regardless of what type of
terminal you use.
That behaviour is standard; most implementations of the
real vi supports it too. Elvis extends this to allow
you to use "#1s" to refer to <shift>+<F1>, "#1c" to
refer to <control>+<F1>, and "#1a" to refer to
<alt>+<F1>. The termcap description for the terminal
should have fields named :s1=:c1=:a1=: respectively, to
define the code sent by these key conbinations. (You
should also have :k2=:s2=:c2=:a2=: for the <F2> key,
and so on.)
But there may be problems. The terminfo database
doesn't support :s1=:c1=:a1=:, so no terminfo terminal
description could ever support shift/control/alt func-
tion keys; so you might as well add -DNO_SHIFT_FKEY to
CFLAGS if you're using terminfo.
Note that, even if you have -DNO_FKEYS, you can still
configure Elvis to use your function keys my mapping
the literal character codes sent by the key. You just
couldn't do it in a terminal-independent way. TERM_925
-DTERM_AMIGA -DTERM_VT100 -DTERM_VT52 etc.
The tinytcap.c file contains descriptions of several
terminal types. For each system that uses tinytcap, a
reasonable subset of the available descriptions is
actually compiled into Elvis. If you wish to enlarge
this subset, then you can add the appropriate
-DTERM_XXX flag to your CFLAGS settings.
August 10, 1992
9-7 CFLAGS 9-7
For a list of the available terminal types, check the
tinytcap.c file.
-DINTERNAL_TAGS
Normally, Elvis uses the "ref" program to perform tag
lookup. This is more powerful than the real vi's tag
lookup, but it can be much slower.
If you add -DINTERNAL_TAGS to your CFLAGS setting, then
will use its own internal tag lookup code, which is
faster.
-DPRSVDIR=_d_i_r_e_c_t_o_r_y
This controls where preserved files will be placed. An
appropriate default has been chosen for each Operating
System, so you probably don't need to worry about it.
-DFILEPERMS=_n_u_m_b_e_r
This affects the attributes of files that are created
by Elvis; it is used as the second argument to the
creat() function. The default is 0666 which (on UNIX
systems at least) means that anybody can read or write
the new file, but nobody can execute it. On UNIX sys-
tems, the creat() call modifies this via the umask set-
ting.
-DKEYBUFSIZE=_n_u_m_b_e_r
This determines the size of the type-ahead buffer that
elvis uses. It also limits the size of keymaps that it
can handle. The default is 1000 characters, which
should be plenty.
August 10, 1992